package ylsb.service;


import org.springframework.stereotype.Service;
import ylsb.dao.YiyongyuanzeMapper;
import ylsb.dao.YltpYuanzeMapper;
import ylsb.model.Yiyongyuanze;
import ylsb.model.YiyongyuanzeExample;
import ylsb.model.YltpYuanze;
import ylsb.model.YltpYuanzeExample;

import javax.annotation.Resource;
import java.util.List;

@Service
public class YltpyuanzeService {

    @Resource
    YltpYuanzeMapper ddMapper;

    public List<YltpYuanze> findOne(String ppdetailid, String ppxiangmuid, String ppuserid){
        YltpYuanzeExample mmExample=new YltpYuanzeExample();
        mmExample.createCriteria().andDetailidEqualTo(ppdetailid).andXiangmuidEqualTo(ppxiangmuid).andUseridEqualTo(ppuserid);
        return  ddMapper.selectByExample(mmExample);
    }
    public boolean modify(YltpYuanze yltpYuanze){return ddMapper.updateByPrimaryKeySelective(yltpYuanze)==1;}

    public boolean add(YltpYuanze yltpYuanze){
        return ddMapper.insert(yltpYuanze)==1;
    }

}
